National Disaster Mitigation Agency spokesman Sutopo Purwo Nugroho said the well in Pasi Putih village in eastern Aceh ignited early Wednesday and is still burning.
He said the well, drilled to a depth of about 250 meters (820 feet), was gushing when it ignited and many people were around it trying to collect the oil.
The agency listed 19 people as injured and said five nearby houses were burned in the inferno.
Edi Gunawan, director of a local hospital, told Indonesian television that those hospitalized have burns between 20 and 60 percent of their bodies.
Several victims in serious condition have been transferred to a larger hospital, he said.
The national disaster agency described the well as “traditional,” likely meaning it had unclear ownership and was used by the local community.
More about: #Indonesia